<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>v-model</title>
    <script type="text/javascript" src="../assets/js/vue-2.3.0.js"></script>
</head>
<body>
    <h1>v-model</h1>
    <hr>
    <div id="app">
        <h3>文本框</h3>
        v-model<input type="text" name="" id="" v-model="message"><br>
        lazy<input type="text" name="" id="" v-model.lazy="message"><br>
        number<input type="text" name="" id="" v-model.number="age"><br>
        trim<input type="text" name="" id="" v-model.trim="message"><br>
        <h3>文本域名</h3>
        <textarea v-model="message" name="" id="" cols="30" rows="5"></textarea>
        <h3>多选框</h3>
        <input type="checkbox" name="" id="istrue" v-model="istrue">
        <label for="istrue">{{istrue}}</label>
        <h3>多选绑定一个数组</h3>
        <p>
             <input type="checkbox" id="JSPang" value="JSPang" v-model="web_Names">
             <label for="JSPang">JSPang</label><br/>
             <input type="checkbox" id="Panda" value="Panda" v-model="web_Names">
             <label for="JSPang">Panda</label><br/>
             <input type="checkbox" id="PanPan" value="PanPan" v-model="web_Names">
             <label for="JSPang">PanPan</label>
             <p>{{web_Names}}</p>
        </p>
        <h3>单选按钮绑定</h3>
        <input type="radio" id="one" value="男" v-model="sex">
        <label for="one">男</label>
        <input type="radio" id="two" value="女" v-model="sex">
        <label for="one">女</label>
        <span>{{sex}}</span>
        <h3>选择列表 下拉框</h3>
        <select name="" id="" v-model="selected">
            <option disabled value="">请选择</option>
            <option>a</option>
            <option>b</option>
            <option>c</option>
        </select>
        <span>{{selected}}</span><br>
        <select v-model="selected2">
            <option v-for="option in options" v-bind:value="option.value">
                {{ option.text }}
            </option>
        </select>
        <span>Selected: {{ selected2 }}</span>
    </div>
</body>
<script type="text/javascript">
    var app = new Vue({
        el:'#app',
        data:{
            message:'helloworld!',
            age:0,
            istrue:false,
            web_Names:[],
            sex:'',
            selected:'',
            selected2:'',
            options:[
			    { text: 'One', value: 'A' },
                { text: 'Two', value: 'B' },
                { text: 'Three', value: 'C' }]
        },
        methods:{
          
        }
    })
</script>
</html>